/**
 * @Author: 赵京涛 z19472333952022@163.com
 * @Date: 2024-08-30 09:18:30
 * @LastEditors: 赵京涛 z19472333952022@163.com
 * @LastEditTime: 2024-08-30 09:18:30
 * @projectName: HeBeiHaiYangBeiDaiHeData
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import Layout from '@/layout'
import { createRouter, createWebHashHistory } from 'vue-router'
import { countyAssessment } from './modules/countyAssessment'
const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'complex',
      component: Layout,
      redirect: '/countyAssessment',
      hidden: true,
      label: 'hidden',
      id: 1,
      meta: { title: '首页', icon: '&#xe750;' },
      zoom: 1
    },
    {
      path: '/login',
      component: () => import('@/views/Login/index'),
      meta: { title: '登录页', icon: '&#xe750;' },
      hidden: true,
      label: 'hidden'
    },
    ...countyAssessment,
  ],
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition
    } else {
      return { top: 0 }
    }
  },
})

export default router
